import React from 'react';
import { Route } from 'react-router';

import DoorPage from './components/task/DoorPage';
import TeamPortraitIndex from './components/portrait/team/TeamPortraitIndex'
import IndividualPortraitIndex from './components/portrait/individual/MyPortraitView'
import TaskDetail from './components/task/TaskDetail';
import TaskAdd from './components/task/TaskAdd';
import TaskMain from './components/task/TaskMain';
import TaskIndex from './components/task/TaskIndex';
import OtherRelateTastList from './components/task/OtherRelateTastList';
import PlanIndex from './components/plan/PlanIndex';
import GoalIndex from './components/goal/GoalIndex';
import PerformanceIndex from './components/performance/PerformanceIndex';
import AccessView from './components/performance/accessview/AccessView';
import ProgramView from './components/performance/programView/ProgramView';
import ProgramItem from './components/performance/programItem/ProgramItem';
import ProgramIndex from './components/performance/ProgramIndex';
import GoalDetail from './components/goal/GoalDetail';
import stores from './stores/index';
import PlanView from './components/plan/planView'
import YearInventoryView from './components/portrait/individual/YearInventoryView'
import './style/index';
import { WeaLocaleProvider } from 'ecCom'
const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'workrelate');
const WorkrelateRoute = (
  <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@yx93h7`} path='workrelate' onEnter={getLocaleLabel}>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@fgjp7v`} path='task'>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@0aaq6z`} name='doorpage' breadcrumbName='门户页签' path='doorpage' component={DoorPage} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@4ozlid`} name='taskMain' breadcrumbName='任务列表' path='taskMain' component={TaskMain} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@kz2m63`} name='taskIndex' breadcrumbName='任务主页' path='taskIndex' component={TaskIndex} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@bi6w9b`} name='taskDetail' breadcrumbName='任务卡片' path='taskDetail' component={TaskDetail} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@6wa1k0`} name='taskAdd' breadcrumbName='新增任务' path='taskAdd' component={TaskAdd} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@eybwtd`} name='otherTastList' breadcrumbName='其他模块相关任务列表' path='otherTastList' component={OtherRelateTastList} />
    </Route>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@luwxj4`} path='plan'>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@q9n9rd`} name='planIndex' breadcrumbName='报告主页' path='planIndex' component={PlanIndex} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@e3vvf8`} name='planView' breadcrumbName='我的报告' path='planView' component={PlanView} />
    </Route>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@htn7kj`} path='goal'>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@8ikq3u`} name='goalIndex' breadcrumbName='目标主页' path='goalIndex' component={GoalIndex} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@a199kl`} name='goalDetail' breadcrumbName='详细目标' path='goalDetail' component={GoalDetail}/>
    </Route>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@3zac5h`} path='performance'>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@4ovcv8`} name='performanceIndex' breadcrumbName='绩效主页' path='performanceIndex' component={PerformanceIndex} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@6i8qwz`} name='accessView' breadcrumbName='绩效评分' path='accessView' component={AccessView} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@kf6oji`} name='programView' breadcrumbName='绩效方案' path='programView' component={ProgramView} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@sfjtg5`} name='programIndex' breadcrumbName='方案' path='programIndex' component={ProgramIndex} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@qpc8is`} name='programItem' breadcrumbName='方案项' path='programItem' component={ProgramItem} />
    </Route>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@l5hyvi`} path='portrait'>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@yockx6`} name='teamPortraitIndex' breadcrumbName='团队画像主页' path='teamPortraitIndex' component={TeamPortraitIndex} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@vddsjw`} name='individualPortraitIndex' breadcrumbName='个人画像主页' path='individualPortraitIndex' component={IndividualPortraitIndex} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@x7mnvw`} name='yearInventoryView' breadcrumbName='年度盘点' path='yearInventoryView' component={YearInventoryView} />
    </Route>
  </Route>
);

const WeaTaskDoorPageCom = (props) => {
  return <DoorPage ecId={`${this && this.props && this.props.ecId || ''}_DoorPage@bzc7ni`} {...props} key='DoorPage'/>
}

module.exports = {
  Route: WorkrelateRoute,
  store: stores,
  WeaTaskDoorPageCom: WeaTaskDoorPageCom,
};